//
//  UINavigationController+(iVOCAddtion).m
//  iVoc
//
//  Created by Zhu Wu on 7/19/09.
//  Copyright 2009 Sonic. All rights reserved.
//

#import "UIViewController+(iVOCAddtion).h"


@implementation UIViewController(iVOCAddtion)

-(UIViewController*)prevController
{
	UINavigationController *navController = [self navigationController];
	
	NSArray *controllers = [navController viewControllers];
	
	NSUInteger indexOfSelf = [controllers indexOfObject:self];
	
	if(indexOfSelf >0)
	{
		return [controllers objectAtIndex:indexOfSelf -1];
	}
	
	return nil;
}

@end
